/*
** my_factorielle_rec.c for my_factorielle_rec in /home/gueux_g/piscine/Jour_05
**
** Made by gregory gueux
** Login   <gueux_g@epitech.net>
**
** Started on  Fri Oct  5 11:13:49 2012 gregory gueux
** Last update Thu Oct 11 20:36:57 2012 gregory gueux
*/

int		my_calc(int *nb, int i)
{
  if (i == 0)
    return (0);
  *nb = *nb * i;
  i = i - 1;
  my_calc(nb, i);
}

int		my_factorielle_rec(int nb)
{
  if (nb == 0)
    return (1);
  if (nb < 0)
    return (0);
  my_calc(&nb, (nb - 1));
  return (nb);
}
